import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

// 引入Element Plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 引入Element Plus图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 引入VXETable
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

// 引入全局样式
import './assets/styles/global.css'

const app = createApp(App)

// 注册Element Plus图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

// 使用Element Plus和VXETable
app.use(ElementPlus)
app.use(VXETable)

// 使用路由并挂载应用
app.use(router).mount('#app')
